import request from '@/utils/request'
import {getToken} from '@/utils/auth'
var token = getToken()
//列表
export function getDepartList() {
  return request({
    url: '/depart/list',
    method: 'get',
  })
}
// 分页列表
export function getDepartPageList(data,pageData) {
  return request({
    url: '/depart/page/'+pageData.pageNo+'/'+pageData.pageSize,
    method: 'post',
    data
  })
}
//新增
export function getDepartAdd(data) {
    return request({
      url: '/depart/add',
      method: 'post',
      data
    })
  }

// 修改
export function getDepartUpdate(data) {
    return request({
      url: '/depart/update',
      method: 'post',
      data
    })
  }


// 查看
export function getDepartDetail(id) {
    return request({
      url: '/depart/detail/'+id,
      method: 'get',
    })
  }

// 删除
export function getDepartDelete(id) {
    return request({
      url: '/depart/delete/'+id,
      method: 'get',
    })
  }